package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.enumclass.AuditStatus;
import com.rockcent.mall.lib.domain.enumclass.MarketMerchantCooperationStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 会员账号充值提交记录
 * Created by zhangjh on 2017/03/07.
 */
@Entity
@Table(name = "mall_member_recharge_flow")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class MallMemberRechargeFlow extends IDEntityMall {

    /**
     *流水号
     */
    @Column(columnDefinition = "varchar(100) comment '流水号'")
    private String seqNo;

    /**
     * 平台ID
     */
    @Column(columnDefinition = "bigint(20) comment '平台ID'")
    private Long mallId;

    /**
     * 会员账号ID
     */
    @Column(columnDefinition = "bigint(20) comment '平台商户ID'")
    private Long mallMemberId;

    /**
     *金额
     */
    @Column(columnDefinition = "DECIMAL(30,10) comment '金额'")
    private BigDecimal rechargeAmount;

    /**
     * 汇款账号
     */
    @Column(columnDefinition = "varchar(30)  comment '汇款账号'")
    private String rechargeAccount;

    /**
     * 汇款时间
     */
    @Column(columnDefinition = "varchar(30)  comment '充值日期'")
    private String rechargeDate;

    /**
     * 充值凭证
     */
    @Column(columnDefinition = "varchar(300)  comment '充值凭证'")
    private String rechargeVoucher;

    /**
     * 审核状态
     */
    @Column(columnDefinition = "varchar(30) comment '审核状态 ALL(\"全部\"),WAIT(\"待审核\"),AUDITED(\"已审核\"), PASS(\"通过\"),REFUSE(\"不通过\")'")
    @Enumerated(EnumType.STRING)
    private AuditStatus auditStatus;

    /**
     * 备注
     */
    @Column(columnDefinition = "varchar(100)  comment '备注'")
    private String remark;

    /**
     * 审核时间
     */
    @Column(columnDefinition = "datetime comment '审核时间'")
    private Date dateAudited;



    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public BigDecimal getRechargeAmount() {
        return rechargeAmount;
    }

    public void setRechargeAmount(BigDecimal rechargeAmount) {
        this.rechargeAmount = rechargeAmount;
    }

    public AuditStatus getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(AuditStatus auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getMallMemberId() {
        return mallMemberId;
    }

    public void setMallMemberId(Long mallMemberId) {
        this.mallMemberId = mallMemberId;
    }

    public String getRechargeAccount() {
        return rechargeAccount;
    }

    public void setRechargeAccount(String rechargeAccount) {
        this.rechargeAccount = rechargeAccount;
    }

    public String getRechargeDate() {
        return rechargeDate;
    }

    public void setRechargeDate(String rechargeDate) {
        this.rechargeDate = rechargeDate;
    }

    public String getRechargeVoucher() {
        return rechargeVoucher;
    }

    public void setRechargeVoucher(String rechargeVoucher) {
        this.rechargeVoucher = rechargeVoucher;
    }

    public Date getDateAudited() {
        return dateAudited;
    }

    public void setDateAudited(Date dateAudited) {
        this.dateAudited = dateAudited;
    }

    @Override
    public String toString() {
        return "MallMemberRechargeFlow{" +
                "seqNo='" + seqNo + '\'' +
                ", mallId=" + mallId +
                ", mallMemberId=" + mallMemberId +
                ", rechargeAmount=" + rechargeAmount +
                ", rechargeAccount='" + rechargeAccount + '\'' +
                ", rechargeDate='" + rechargeDate + '\'' +
                ", rechargeVoucher='" + rechargeVoucher + '\'' +
                ", auditStatus=" + auditStatus +
                ", remark='" + remark + '\'' +
                ", dateAudited=" + dateAudited +
                '}';
    }
}
